package com.hc.ssm.services;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hc.ssm.dao.UsersMapper;
import com.hc.ssm.pojo.Users;

@Service
public class UsersServicesImpl implements UsersServices {

	@Autowired
	private UsersMapper usersMapper;

	
	
	@Override
	public Map<String, Object> login(Map<String, Object> map) {
		return usersMapper.login(map);
		
	}

	@Override
	public boolean updateUserInfo(Map<String, Object> map) {
		int i = usersMapper.updateUserInfo(map);
		if (i > 0)
			return true;
		return false;
	}

	@Override
	public boolean deleteUser(Map<String, Object> map) {
		int i = usersMapper.deleteUser(map);
		if (i > 0)
			return true;
		return false;
	}

	@Override
	public boolean addUser(Users users) {
		int i = usersMapper.addUser(users);
		if (i > 0)
			return true;
		return false;
	}

	@Override
	public List<Map<String, Object>> findAll(Map<String, Object> map) {
		return usersMapper.findAll(map);
	}

	@Override
	public Map<String, Object> countAll(Map<String, Object> map) {
		return usersMapper.countAll(map);
	}

	@Override
	public void test(Map<String, Object> map) {
		int i=  usersMapper.test(map);
	}

}
